<include file="../header" />
<body class="J_scroll_fixed">
    <script>
        $(document).ready(function() {
            
             $('button.viewcard').click(function () {

                var id = $(this).attr("id");
                var shopId =$(this).attr("shopId");
                layer.open({

                    type: 2,
                    title: '查看会员卡购买记录',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['80%', '98%'],
                    content: "{:U('vip/myVipRecord')}&id="+id+"&shopId="+shopId

                });
            });
            $('button.viewgift').click(function () {

                var id = $(this).attr("id");
                var shopId =$(this).attr("shopId");
                layer.open({

                    type: 2,
                    title: '查看会员卡赠送记录',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['80%', '98%'],
                    content: "{:U('vip/myVipGiftRecord')}&id="+id+"&shopId="+shopId

                });
            });
        
        });
    </script>
<form class="well form-search" method="post" style="float:left;width:100%;" action="{:U('vip/vipCardIndex')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            店&nbsp;&nbsp;&nbsp;&nbsp;铺：{:getShopSelectHtml($shopId,1)}
            指纹：
        <input type="text" name="finger" class="input" value="{$finger}" />
            手机号：
        <input type="text" name="mobile" class="input" value="{$mobile}" />
        会员姓名：
        <input type="text" name="vipName" class="input" value="{$vipName}" />
            <button class="btn btn-primary">搜索</button>
            <a class="btn" href="{:U('vip/vipCardIndex')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">

    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>编号</th>
            <th>店铺</th>
            <th>会员姓名</th>
            <th>手机号</th>
            <th>指纹</th>
            <th>创建时间</th>
            <th>截止时间</th>
            <th>已锻炼(月)</th>
            <th>剩余(月)</th>
            <th>有效期(月)</th> 
            <th>状态</th>
            <th>开通记录</th>
            <!--<th>赠送记录</th>-->
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>{$vo.relationship_id}</td>
                <td>{$vo.shop_name}</td>
                <td>{$vo.vip_name}</td>
                <td>{$vo.mobile}</td>
                <td>{$vo.finger}</td>
                <td>{$vo.create_time}</td>
                <td>{$vo.end_time}</td>
                <td>{$vo.done}</td>
                <td>{$vo.remain}</td>
                <td>{$vo.total}</td>
                <td>
                    {:getEnumString($cardstatus, $vo['status'])}
                </td>
                <td><button class="viewcard btn" id="{$vo['vip_id']}" shopId="{$vo['shop_id']}">查看</button></td>
                <!--<td><button class="viewgift btn" id="{$vo['vip_id']}" shopId="{$vo['shop_id']}">查看</button></td>-->
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>